home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / mailers / binkla20.zip / BKLARPTS.BAS < prev    next >
BASIC Source File  |  1992-02-19  |  2KB  |  75 lines

  1.     DEFINT A-Z
  2.  
  3.   '   Program Name:  BKLARPTS.EXE
  4.   '         Author:  R.J.(Bob) Ross  FidoNet 1:134/75
  5.   '   Date Started:  January 25th. 1992
  6.   ' Date Completed:  Revised February 19, 1992
  7.   '
  8.   '        Purpose:  To make four separate reports using BKLARpt.Txt
  9.   '                  as input.  Output to BKLARpt(1 to 4).Txt
  10.   '
  11.   '           Note:  BKLARPTS.EXE must be executed in the directory
  12.   '                  where BKLARpt.Txt resides.  No specific error checking
  13.   '                  is done to make sure that BKLARpt.Txt exists.  If it
  14.   '                  doesn't the program will BOMB.
  15.   '
  16.   '                  This program is compatable with MS DOS 5.0 QBasic and
  17.   '                  may be compiled using QuickBASIC 4.5.  I Linked with
  18.   '                  Crescent Software library P.D.Q. which makes the EXE
  19.   '                  file a LOT SMALLER.
  20.   '
  21.   '                  To run BKLARpts.bas from MS DOS 5.0 QBasic and return
  22.   '                  to the DOS system prompt run as follows:
  23.   '                  QBASIC /RUN BKLARPTS
  24.  
  25.  
  26.     DIM Header$(1 TO 6)         'Make this (1 TO 5) if you have not pre-configured
  27.                                 'BinkLA with your System Name (-SN)
  28.  
  29.     ON ERROR GOTO Drats:        'Global error trap
  30.  
  31.   'Open BKLARpt.Txt - output created by BinkLA
  32.   '-------------------------------------------
  33.     OPEN "BKLARpt.Txt" FOR INPUT AS #6          'Read access
  34.  
  35.   'Get the BKLARpt.Txt header info
  36.   '-------------------------------
  37.     FOR X% = 1 TO 6             '1 TO 5 if BinkLA not pre-configured with -SN
  38.         LINE INPUT #6, Header$(X%)
  39.     NEXT
  40.  
  41.     FOR Rpt% = 1 TO 4      'change to 5 if -MD switch selected in BinkLA
  42.  
  43.         Rpt$ = LTRIM$(STR$(Rpt%))
  44.         OPEN "BKLARpt" + Rpt$ + ".Txt" FOR OUTPUT AS Rpt%
  45.  
  46.       'Write Out "BKLARptn.Txt"
  47.       '------------------------
  48.         FOR X% = 1 TO 5
  49.             PRINT #Rpt%, Header$(X%)
  50.         NEXT
  51.  
  52.         DO
  53.             LINE INPUT #6, ReportBody$
  54.             IF LEFT$(ReportBody$, 1) = "" THEN
  55.                'do nothing
  56.             ELSE
  57.             PRINT #Rpt%, ReportBody$
  58.             END IF
  59.         LOOP UNTIL LEFT$(ReportBody$, 1) = "╘" OR EOF(6)
  60.         CLOSE Rpt%
  61.         PRINT "BKLARpt" + Rpt$ + ".Txt - Done"
  62.     NEXT
  63.  
  64.     CLOSE : SYSTEM
  65.  
  66. Drats:
  67.  
  68.     BEEP
  69.     PRINT "Program bombed!"
  70.     SYSTEM
  71.  
  72.  
  73.  
  74.  
  75.